package com.flyduck.interceptor;

import com.flyduck.util.RequestUtil;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @program: flyduck-admin
 * @description: 请求拦截器
 * @author: flyduck
 * @create: 2020-05-10 19:25
 **/
public class RequestInterceptor implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        System.out.println("来到了拦截器");
        RequestUtil.setRequest(request);
        return true;
    }
}
